package com.uchengwang.ui.cm_ui.ucity.cityBean;

import android.text.TextUtils;

import com.uchengwang.functions.http.manager.OSSManager;
import com.uchengwang.ui.utils.UCommonUtil;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

/**
 * Created by U城网 on 2017/11/27.
 */

public class ThemeShareBean implements Serializable{
    private String banReason;
    private long bannerId;
    private int commentCount;
    private long createTime;
    private long id;
    private boolean isLike;
    private int likeCount;
    private String nickName;
    private String topicContent;
    private String topicImgs;
    private long uid;
    private String userAvatar;
    private boolean userDelete;
    private boolean isExpand;
    private int imgsWidth;
    private int imgsHeight;
    private String remarkName;

    public String getRemarkName() {
        return remarkName;
    }

    public void setRemarkName(String remarkName) {
        this.remarkName = remarkName;
    }

    private int shareType;//自己定义的type 1说明显示在顶部的图片 0正常显示发布的信息

    public boolean isExpand() {
        return isExpand;
    }

    public void setExpand(boolean expand) {
        isExpand = expand;
    }

    public int getShareType() {
        return shareType;
    }

    public void setShareType(int shareType) {
        this.shareType = shareType;
    }

    public int getImgsWidth() {
        return imgsWidth;
    }

    public void setImgsWidth(int imgsWidth) {
        this.imgsWidth = imgsWidth;
    }

    public int getImgsHeight() {
        return imgsHeight;
    }

    public void setImgsHeight(int imgsHeight) {
        this.imgsHeight = imgsHeight;
    }

    public String getBanReason() {
        return banReason;
    }

    public void setBanReason(String banReason) {
        this.banReason = banReason;
    }

    public long getBannerId() {
        return bannerId;
    }

    public void setBannerId(long bannerId) {
        this.bannerId = bannerId;
    }

    public int getCommentCount() {
        return commentCount;
    }

    public void setCommentCount(int commentCount) {
        this.commentCount = commentCount;
    }

    public long getCreateTime() {
        return createTime;
    }

    public void setCreateTime(long createTime) {
        this.createTime = createTime;
    }

    public long getId() {
        return id;
    }

    public void setId(long id) {
        this.id = id;
    }

    public boolean isLike() {
        return isLike;
    }

    public void setLike(boolean like) {
        isLike = like;
    }

    public int getLikeCount() {
        return likeCount;
    }

    public void setLikeCount(int likeCount) {
        this.likeCount = likeCount;
    }

    public String getNickName() {
        return nickName;
    }

    public void setNickName(String nickName) {
        this.nickName = nickName;
    }

    public String getTopicContent() {
        return topicContent;
    }

    public void setTopicContent(String topicContent) {
        this.topicContent = topicContent;
    }

    public String getTopicImgs() {
        return topicImgs;
    }

    public void setTopicImgs(String topicImgs) {
        this.topicImgs = topicImgs;
    }

    public long getUid() {
        return uid;
    }

    public void setUid(long uid) {
        this.uid = uid;
    }

    public String getUserAvatar() {
        return userAvatar;
    }

    public void setUserAvatar(String userAvatar) {
        this.userAvatar = userAvatar;
    }

    public boolean isUserDelete() {
        return userDelete;
    }

    public void setUserDelete(boolean userDelete) {
        this.userDelete = userDelete;
    }

    public List<String> getPhotos(){
        List<String> photos = new ArrayList<>();
        if (!TextUtils.isEmpty(topicImgs)){
            //多张图片放在一个String串里
            List<String> urls = Arrays.asList(topicImgs.split(";"));
            for (String url : urls){
                String imageUrl = UCommonUtil.getUtil().getOssImageUrl(OSSManager.OSS_SHARE) + url;
                photos.add(imageUrl);
            }

        }
        return photos;
    }

}
